<template>
    <div>
        <div style="display: flex; align-items: center; justify-content: center; font-size: 24px">{{news.title}}</div>
        <div style="display: flex; align-items: center; justify-content: center; margin-top: 10px;
        font-size: 16px">类型：{{news.sign}}</div>
        <div style="display: flex; align-items: center; justify-content: center; margin: 15px 0 0 0">
            报名时间：{{news.startime}} - {{news.endtime}}
        </div>
       <el-button @click="$router.push('/news')">返回</el-button>
        <div style="display: flex; align-items: center; justify-content: center; margin: 5px 0 0 0">
            简介：{{news.description}}
        </div>
        <div style="box-shadow: 0 2px 4px rgba(0,0,0, .12); padding: 5px">
            <div v-html="news.content"></div>
        </div>
        <div style="display: flex; align-items: center; justify-content: center; margin: 10px 0 0 0">发布人：{{ news.author }}
            <span style="margin-left: 20px">发布时间：{{ news.createdtime}}</span></div>

    </div>
</template>

<script>
    export default {
        name: "NewsDetail",
        data() {
            return {
                news: {}
            }
        },
        created() {
            let id = this.$route.query.id
            if (!id) {
                return
            }
            this.$request.get('/news/selectById/' + id).then(res => {
                this.news = res.data
            })
        },
        methods: {}
    }

</script>

<style scoped>

</style>